package 面向对象编程基础;


class Client{
    String name;
    // 定义私有的成员变量身份证号码
    private String idNumber = "110234158295352";
    protected float deposit;   // 定义受保护的成员变量存款deposit
    public String bankName;    // 定义公共的成员变量银行名称bankName
    // 定义公共的成员方法,返回客户信息
    public void showInfo(){
        System.out.println("客户姓名：" + name);
        System.out.println("身份证号码：" + idNumber);
        System.out.println("存款：" + deposit);
        System.out.println("银行名称：" + bankName);
    }
}
public class Example4_7 {
    public static void main(String[] args) {
        Client c = new Client();
        c.name = "张三";
        c.deposit = 121545.23f;
        c.bankName = "中国银行";
        c.showInfo();
    }
}
